package org.example.work3.order.controller;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author xh
 * @date 2023/04/03
 */
@RestController
@RequestMapping("/order")
@Slf4j
@RefreshScope
public class OrderController {


    @Value("${server.port}")
    private Integer port;

    @GetMapping(value = "/port")
    public String getPort() {
        System.out.println("当前端口："+port);
        return "当前端口"+port;
    }

}
